<?php
include_once("./lib/impl/MerchantImpl.php");
include_once("./lib/utils/AlgorithmUtils.php");

$oMerchantImpl 	= new MerchantImpl(DB_TAG_COUPON);
$algorithm 		= new AlgorithmUtils();

$oMerchants 	= $oMerchantImpl->getPopular(0, 30);

$algorithm->calMerchantShowFont($oMerchants);



//$oMerchantsFeatured = $oMerchantImpl->getFeaturedMerchants(0, 15);
//
//foreach ($oMerchantsFeatured as $oMerchant) {
//	$oLogo 	= $oMerchantImpl->getLogo($oMerchant->getId());
//	
//	if(!is_object($oLogo)){
//		$oLogo = new ImageDomain();
//		
//		$oLogo->setId(0);
//		$oLogo->setExtName('gif');
//	}
//	
//	$oMerchant->setLogo($oLogo);
//	
//	
//}

//foreach ($oMerchants as $oMerchant) {
//	
//	$str .= $oMerchant->getName() . chr(10);
//}
//echo "str=" . $str;
?>
